package com.xunfang.springboot07redis;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 *    redis 的自动装配
 *
 *    01 @SpringBootApplication ==> @EnableAutoConfiguration 开启自动装配 ===>
 *           AutoConfigurationImportSelector.class  加载文件 ===> 171 加载 No auto-configuration attributes found. Is 文件
 *
 *    02 加载类 org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration (自动装配的类)
 *       01 @EnableConfigurationProperties(RedisProperties.class)  读取yaml中的redis的配置
 *       02  创建  RedisTemplate 对象 添加到ioc容器中
 *          @Bean
 *          public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
 * 		        RedisTemplate<Object, Object> template = new RedisTemplate<>();
 * 		        template.setConnectionFactory(redisConnectionFactory);
 * 		        return template;
 *          }
 *
 */
@SpringBootApplication
public class Springboot07RedisApplication {

    public static void main(String[] args) {
        SpringApplication.run(Springboot07RedisApplication.class, args);
    }

}
